<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ include file="/pub/includ.jsp"%>
<%
	String inforId = (String)request.getAttribute("id");
%>
<html>
<head>
<script charset="utf-8" src="/editor/kindeditor.js"></script>
<title>雅宝路信息网 致力于服务雅宝路人的最大信息网</title>
<meta name="keywords" content="雅宝路 物流 交友 二手货 发货 甩货 免费发布信息" />
<meta name="description" content="雅宝路信息网，致力于服务雅宝路人的最大信息网。为你提供房产、车辆、招工、兼职、物流等海量雅宝路分类信息"/>
<script type="text/javascript"
	src="<%=path%>/resources/js/shouye.js"></script>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/site/${SiteAccessPath}/css/css.css"
	type="text/css"/>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/site/${SiteAccessPath}/css/global.css"
	type="text/css"/>
<script type="text/javascript">
	var codemap = new Array(); 
	$(function(){
        $.ajax({
			url :"<%=request.getContextPath()%>/ext/information/find/<%=inforId%>", //要访问的后台地址
		    data: "code=<%=com.wing.sys.domain.Code.YBL_TYPE_CODE%>", //要发送的数据
		    type : 'POST', //使用get方法访问后台
		    dataType : 'json', //返回json格式的数据
		    success : function(data){
	    		$("#title_div").html(data.title);
	    		$("#content_div").html(data.content);
	    		$("#name_time").html("发帖人："+data.sentName+"&nbsp;&nbsp;发表与："+(new Date(data.createtime)).format("yyyy-MM-dd hh:mm"));
	    		$("#type_id").val(data.type_id);
	    		$("#type_id2").val(data.type_id2);
	    		changeType(data.type_id2,"about_div");
		    }
		});	 
		loadGird("frmxxzs", 1);
		changeType("","other_div");
	})
		
	var callback_frmxxzs = function(rows, frm) {
       $.each(rows, function(i, n){
    	   var row = $("#"+frm+" .template").clone().removeClass("template");
   			       var keyValue = n.id;
	       row.find(".klfoor").html((i+2)+"楼");
	       row.find(".klcreator").html("回复人："+n.login_name);
           var c=n.content;
           if(n.status==<%=com.wing.ext.domain.Information.STATUS_DISABLE %>){
           	c="信息被屏蔽";
           	row.find(".kltime").html("回复时间："+(new Date(n.createtime)).format("yyyy-MM-dd hh:mm")+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
           }else{
	       	row.find(".kltime").html("回复时间："+(new Date(n.createtime)).format("yyyy-MM-dd hh:mm")+"&nbsp;&nbsp;<a href='#' onclick='disable(\""+n.id+"\")'>[屏蔽]</a>");
	       }
 		   row.attr("id","ready"+i);
           row.attr("class","tr_nbw");
           row.appendTo("#"+frm+" .grid");
           $("<tr>"+
	            "<td colspan='4' valign='top' align='left' class='font14' style='line-height:18px;'>"+c+"</td>"+
	         "</tr>").appendTo("#"+frm+" .grid");
	       $("<tr> <td height='10px'>&nbsp;</td> </tr>").appendTo("#"+frm+" .grid");
       });   
	}
	
	function changeType(typeId,constant){
		$.ajax({
			url :"<%=request.getContextPath() %>/ext/information/gethLists", //要访问的后台地址
		    data: "site_id=yblsite01&toHome=1&pageSize=14&type_id="+typeId, //要发送的数据
		    type : 'POST', //使用get方法访问后台
		    dataType : 'json', //返回json格式的数据
		    success : function(data){
	   			var rows = data.recordList; 
	   			var aa = "<ul class='left'>";
		    	$.each(rows, function(i, n){
		    		var title=n.title;
		    		if(title.length>11){
		    			title = title.substr(0,10)+"...";
		    		}
		    		aa = aa+"<li><a style='float:left' href='xxzs?inforId="+n.id+"'>"+title+"&nbsp</a><span style='float:right'>"+(new Date(n.createtime)).format("yyyy-MM-dd")+"</span></li>";
		        }); 
				$("#"+constant).html(aa+"</ul>");
		    }
		});	
	}
	
	function disable(id){
		$.ajax({
		  url :"<%=request.getContextPath() %>/ext/information/disable/"+id, //要访问的后台地址
		  cache: false,
		  success: function(data){
	   			if(data=="success"){
	   				reloadGrid("frmxxzs", 1);
	   			}
		  }
		}); 
	}
</script>
</head>

<body>
<input type="hidden" name="site_id" value="yblsite01"/>

<div style="height:270px;overflow: auto">
	<div class="bbsl left">
    	<div class="bbs_text">
       	  <h3 id="title_div" style="height:30px;line-height: 30px"></h3>
            <span id="name_time"></span>&nbsp;&nbsp;<a href="#" class="orange" style="font-size:12px;">[回复]</a><br  />
            <bdo id="content_div"></bdo>
          <p><br /><br />
            <div style="clear:both"></div>
        </div>
        <form name="frmxxzs" method="post" style="margin: 0" action="<%=path%>/ext/information/getReceipt?site_id=yblsite01&id=<%=inforId%>" id="frmxxzs">
		<div class="bbs_reply">
            <h3>回帖：</h3>
	          <table width="687" border="0" cellspacing="0" cellpadding="0" class="reply_list grid">
	            	<tbody>
						<tr class="template klId" >
						    <td width="96" rowspan="2" align="left" valign="top"><img src="<%=request.getContextPath()%>/site/${SiteAccessPath}/images/people.gif" width="81" height="90" /></td>
		       		    	<td width="94" height="20" align="left" class="klfoor" style="color:#999;"></td>
		            		<td width="298" height="20" align="left" class="klcreator" style="color:#ff6c00;"></td>
		            		<td width="199" height="20" align="right" class="kltime" style="color:#999;"></td>
						</tr>
					</tbody>
					<tfoot>
						<tr>
							<td style="border-right: none">
								<img id="loading"
									src="<%=path %>/resources/skins/default/images/large-loading.gif" width="20px"
									class="hidden loading" />
							</td>
							<td colspan="3" style="border-left: none" class="txtRight">
								<span class="pagediv"></span>
							</td>
						</tr>
					</tfoot>
	          </table>
      </div>	
      </form>
    </div>
</div>
<div style="clear:both"></div>
</body>
</html>






